import Vue from 'vue'
import VueRouter from 'vue-router'
import Index from '../views/Index.vue'


Vue.use(VueRouter)

const routes = [
  {
    path: '/details/:bid',
    name: 'Details',
    component: () => import(/* webpackChunkName: "Ireader" */ '../views/Details.vue'),
    props:true,
  },
  {
    path: '/reg',
    component: () => import(/* webpackChunkName: "Ireader" */ '../views/Reg.vue')
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import(/* webpackChunkName: "Login" */ '../views/Login.vue')
  },
  {
    path: '/search',
    name: 'Search',
    component: () => import(/* webpackChunkName: "Search" */ '../views/Search.vue')
  },
  {
    path: '/',
    name: 'Index',
    component: Index,
    
  },
  {
    path: '/ireader',
    name: 'Ireader',
    component: () => import(/* webpackChunkName: "Ireader" */ '../views/Ireader.vue'),
    meta:{
      keepAlive:true
    }
  },
  {
    path: '/read',
    name: 'Read',
    component: () => import(/* webpackChunkName: "Read" */ '../views/Read.vue'),
   
  },
  {
    path: '/download',
    name: 'Download',
    component: () => import(/* webpackChunkName: "Download" */ '../views/Download.vue')
  },
  {
    path: '/home',
    name: 'Home',
    component: () => import(/* webpackChunkName: "Home" */ '../views/Home.vue')
  },
  {
    path: '/about',
    name: 'About',
    component: () => import(/* webpackChunkName: "About" */ '../views/About.vue')
  },
  {
    path: '/me',
    name: 'Me',
    component: () => import(/* webpackChunkName: "Me" */ '../views/Me.vue')
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import(/* webpackChunkName: "Login" */ '../views/Login.vue')
  },
]

const router = new VueRouter({
  routes
})

export default router
